window.onload=function(){
	var oPurchaseNum=document.getElementById("contentList");
	var oSub=oPurchaseNum.getElementsByClassName("listInfo");
	var oPrice=oPurchaseNum.getElementsByClassName("presentPrice");
	var OriginalPrice=oPurchaseNum.getElementsByClassName("originalPrice");
	var oNum=oPurchaseNum.getElementsByClassName("numOf");
	var oAll=document.getElementById("sumAll");
	var oBreaks=document.getElementById("breaks");
    function fn(){
    	var oSumAll=0;
    	for(var i=0;i<oSub.length;i++){
    		oSumAll = oSumAll+ oPrice[i].innerHTML*oNum[i].innerHTML.slice(1);
    	}
    	oAll.innerHTML=parseFloat(oSumAll);
    }
   fn();
    function preMonery(){
    	var oPreMonery=0;
    	for(var i=0;i<oSub.length;i++){
    		oPreMonery = oPreMonery+parseInt(OriginalPrice[i].innerHTML)*oNum[i].innerHTML.slice(1);
    	}
    	oBreaks.innerHTML=parseFloat(oPreMonery);

    }
    preMonery();
}